package ModelLayer;

import java.sql.Date;

public class Order
{
	private int id;
	private Customer customer;
	private Date regDate;
	private Date deliveryDate;
	private String status;
	private double totalPrice;

	public Order()
	{
//		intentionally left empty
	}
	
	public Order(int id)
	{
		this.id = id;
	}
	
	public Order(Customer customer, Date regDate, Date deliveryDate, String status, double totalPrice)
	{
		this.customer = customer;
		this.regDate = regDate;
		this.deliveryDate = deliveryDate;
		this.status = status;
		this.totalPrice = totalPrice;
	}
	
	public Order(int id, Customer customer, Date regDate, Date deliveryDate, String status, double totalPrice)
	{
		this.id = id;
		this.customer = customer;
		this.regDate = regDate;
		this.deliveryDate = deliveryDate;
		this.status = status;
		this.totalPrice = totalPrice;
	}
	
	public int getId()
	{
		return id;
	}
	
	public void setId(int id)
	{
		this.id = id;
	}
	
	public Customer getCustomer()
	{
		return customer;
	}

	public void setCustomer(Customer customer)
	{
		this.customer = customer;
	}

	public Date getRegDate()
	{
		return regDate;
	}

	public void setRegDate(Date regDate)
	{
		this.regDate = regDate;
	}

	public Date getDeliveryDate()
	{
		return deliveryDate;
	}

	public void setDeliveryDate(Date deliveryDate)
	{
		this.deliveryDate = deliveryDate;
	}

	public String getStatus()
	{
		return status;
	}

	public void setStatus(String status)
	{
		this.status = status;
	}

	public double getTotalPrice()
	{
		return totalPrice;
	}

	public void setTotalPrice(double totalPrice)
	{
		this.totalPrice = totalPrice;
	}

//	public void calcTotalPrice()
//	{
//		int i = 0;
//		double totalPrice = 0;
//		partOrderPrice double = PartOrder.get(i).getProductID();
//		while(i < PartOrder.size())
//		{
//			totalPrice = (totalPrice + PartOrder.get(i).getProductID() * PartOrder.get(i).getQuantity());
//			i++;
//		}
//		this.totalPrice = totalPrice;
//	}
}